package com.hyst.satelite;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;

/**
 * Hello world!
 *
 */
public class App {
	public static void main(final String[] args) throws IOException {
		System.out.println("----------------------------");
		System.err.println(Character.toChars(861));
//		final ObjectMapper mapper = new ObjectMapper();
//		final Config config = mapper.readValue(new File("f://c.json"), Config.class);
//		System.out.println(config);
		byte[] by = new byte[10];
		final InputStream inputStream = new FileInputStream(new File("f://c.json"));
		final File file = new File("f://out.txt");
		final OutputStream outputStream = new FileOutputStream(file);
		while (inputStream.read(by) > 0) {
			for (final byte element : by) {
				System.out.println(element);
//				System.out.print(Character.toChars(element));
			}
			outputStream.write(by);
			by = new byte[10];
			System.out.println();
		}
		outputStream.flush();
		outputStream.close();
		System.out.println("---------------------读取完毕--------------------------------");
		inputStream.close();
	}
}
